1. Field of the Invention
The present invention relates to a method and an apparatus for controlling a stepping motor. In particular, the present invention discloses a method and an apparatus for controlling calibration of a stepping motor.
2. Description of the Prior Art
Because stepping motors are driven by a simple control mechanism, the stepping motors have been applied on many control systems for controlling the velocity, the displacement, and the moving direction of loading devices. The stepping motor has no brush, and a rotor of the stepping motor spins because magnetic fields imposed on poles of a stator are alternatively switched. Therefore, the main difference between the stepping motor and a general motor is that the stepping motor only powered by a fixed driving voltage does not rotate. However, the stepping motor is a mechanical device controlled by digital signals. When a digital pulse signal is inputted into the stepping motor, the rotor of the stepping motor is rotated by a fixed angle, that is, a well-known stepping angle. Because the stepping motor is capable of receiving the digital signals to generate a corresponding angle variation in proportion to the total number of pulses, the stepping motor can be driven by an open loop without utilizing a feedback mechanism. Therefore, the stepping motor can be easily controlled when the stepping motor is driven to achieve a rotational speed within an acceptable range.
In addition, when the stepping motor is powered by an appropriate voltage, a holding torque is induced between the rotor and the stator. Therefore, when a control process of the stepping motor begins, the rotor is capable of resisting an external force for holding its current position if no digital signal is inputted to the stepping motor. Based on different structures and different operating rules of the rotors and stators, the stepping motors, general speaking, are commonly classified into the variable reluctance (VR) type, the permanent magnet (PM) type, and the hybrid type. Because the hybrid type stepping motors have advantages of both the PM type stepping motors and the VR type stepping motors, the hybrid type stepping motors are widely adopted. It is well-known that the PM type stepping motors, the VR type stepping motors, and the hybrid type stepping motors are driven by the same control mechanism.
Because the structures and operating rules of the stepping motors are well-known, lengthy descriptions explaining structures and operating rules are skipped. Please refer to FIG. 1, which is a schematic diagram illustrating a prior art stepping motor control system 10. The stepping motor control system 10 has a user interface (UI) 12, a controller 14, a driving circuit 16, a stepping motor, and a power supply 20. The UI 12 can be positioned at a computer system or a programmable logic controller (PLC). The UI 12 is used for outputting a high-level command 22 to the controller 14. For instance, the stepping motor control system 10 is located inside an optical disk drive for controlling a pick-up head to perform a track seeking operation. Therefore, the UI 12 can directly deliver information associated with the wanted track to the controller 14, and the controller 14 generates a control signal 24 to command the driving circuit 16. For example, the controller 14 outputs step pulses and a direction signal to the driving circuit 16 according to the received track information. Then, the driving circuit 16 outputs an electric current 26 according to the control signal 24 for driving the step motor 18. That is, the current 26 passes the windings surrounded the poles of the stator, and the required magnetic fields are induced to rotate the rotator clockwise or counter-clockwise. Therefore, the stepping motor 18 is capable of moving the pick-up head toward the target track after the UI 12 successfully outputs the track information. In addition, the power needed by the driving circuit 16 for generating the wanted electric current 26 is supplied by the power supply 20.
Generally speaking, the step angle of the stepping motor 18 is determined according to the structure of the stepping motor 18 and the driving mechanism (a full step or a half step for example) adopted by the driving circuit 16. Therefore, the controller 18 can define an index parameter used for determining a relationship between the control signal 24 and the displacement associated with the loading device moved by the stepping motor 18. For instance, regarding the stepping motor control system applied on the optical disk drive, the controller 14 stores an index parameter idxtrk used for defining a ratio between a total number of step pulses idx delivered to the driving circuit 16 and a total number of tracks trk crossed by the pick-up head. That is, idxtrk=idx/trk. Therefore, if the pick-up head wants to move from the current track k to a target track k+m, the required number of step pulses idx is equal to idxtrk*m according to the index parameter idxtrk. Therefore, the stepping motor 18 can move the pick-up head from the initial track k to the desired track k+m finally.
However, while the stepping motor 18 is working, the actual step angle may become unsteady owing to the circuit structure of the stepping motor 18 or other factors, and is deviated from the ideal step angle. That is, when the pick-up head starts the track seeking operation, the arrived track will miss the target track. Consequently, the track seeking operation is repeated to correctly locate the target track. In other words, performance of the optical disk drive is bad owing to the unstable stepping motor 18. Similarly, any control systems using the stepping motor 18 will move the loading device incorrectly owing to the step angle inaccuracy.